package com.rowline.admin.module.study.rpc;

/**
 * ClassName:ReferenceConfig
 * Created by 245167
 * on 2018/4/27  27:17
 * description:
 */
public class ReferenceConfig<T> {

    private Class<?> interfaceClass;

    private transient volatile T ref;

    public synchronized T get(){
        if(ref == null){
            init();
        }
        return ref;
    }

    private void init(){
//        ref = new ProxyFactory(interfaceClass).getProxyObject();
    }

    public Class<?> getInterfaceClass() {
        return interfaceClass;
    }
    public void setInterfaceClass(Class<?> interfaceClass) {
        this.interfaceClass = interfaceClass;
    }

}
